/**
* 
* ====================================================================
*
* @author apov <apov@ymail.com>
*/ 
#pragma once

#include "DBError.h"
#include <sqlext.h>
#include <sqltypes.h>

/**
* @class ODBC_DBError
*  - 
*/ 
class ODBC_DBError : public DBError{
	enum{		
		DEF_ERROR_STR_CODE_SIZE =   		6,
		DEF_ERROR_STR_SIZE =				1024,
	};

public:
	virtual int set_error( DBSession* session, void* data, \
		const char* error_query = 0, const char* error_method = 0, 
		const int error_line = 0 );	

	void reset();

	bool isDisconnect();

	ODBC_DBError();
	virtual ~ODBC_DBError();

protected:

private:	
	SQLINTEGER nativeError_;					///< Native Error		
};
